import request from '@/utils/request'

//查询结存列表
export function listBalance(query){
	return request({
	url: '/wm/period/list',
	method: 'get',
	  params: query
	})
}

// 获取仓库列表
export function listWarehouses(query) {
  return request({
    url: '/wm/warehouses/list',
    method: 'get',
    params: query
  })
}

//结存
export function balanceWm(data){
	return request({
		method:"post",
		url:"/wm/period/balance",
     data:data
	})
}

//反结存
export function aniBalanceWm(data){
	return request({
		method:"post",
		url:"/wm/period/antiBalance",
     data:data
	})
}

// 导出物料
export function exportBalance(query) {
  return request({
    url: '/wm/period/export',
    method: 'get',
    params: query
  })
}

// 根据年份返回结存月份
export function blanceMonth(query) {
  return request({
    url: '/wm/period/getPeriodMonth',
    method: 'get',
    params: query
  })
}

//可结存日期
export function blanceAvailable(query) {
  return request({
    url: '/wm/period/available',
    method: 'get',
    params: query
  })
}

//查询仓库全部结存期间结存状态
export function blanceAll(query) {
  return request({
    url: '/wm/period/getAllPeriodStatus',
    method: 'get',
    params: query
  })
}
